﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Linq;
using System.Windows.Controls;
using System.Collections.Generic;

namespace WPFExcelReport
{
    public partial class TSWAP02
    {
        public TSWAP02()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VAPFOLGE();
            this.DataContext = MV;
            InitializeComponent();
        } 
        public override void OnEXAUFChg(string vlaue)
        {
            if (EXAUF.Length < 8)
                return;
            KRS = EXAUF.Substring(0, 2);
            LFD = EXAUF.Substring(2, 6);
            dwData = TBMain.NewRow();
            dwData["APFMANDANT"] = app.Mandant;
            dwData["APFANRKRS"] = " AND APFANRKRS ='" + EXAUF.Substring(0, 2) + "'";
            dwData["APFALFDNR"] = " AND APFALFDNR = '" + EXAUF.Substring(2, 6) + "'";
            SResult = TMV.QAPF09(dwData);
            MergeData(SResult, false);
             
            base.OnEXAUFChg(vlaue);
        } 
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e);
        }
     
    }
}
